#ifndef DATAMONITORINGANALYSIS_H
#define DATAMONITORINGANALYSIS_H

#include <QObject>



#include "watcherfile.h"

///
/// \brief The DataMonitoringAnalysis class
///监控目录文件，并解析文件数据
///
class DataMonitoringAnalysis : public QObject
{
    Q_OBJECT
public:
    explicit DataMonitoringAnalysis(QObject *parent = nullptr);

    WatcherFile *watcher;



    //标题
    QString tilte;

    ///
    /// \brief unitWeightReadFile
    /// \param path
    ///读取容重结构文件
    void unitWeightReadFile(const QString& path);

    ///
    /// \brief unitWeightAnalysisString
    /// \param datas
    /// \return
    ///容重解析结构
    ///
     QString unitWeightAnalysisString(QStringList datas);

     ///
     /// \brief unitWeightReadFile
     /// \param path
     ///读取水分结构文件
     void waterReadFile(const QString& path);
     ///
     /// \brief waterAnalysisString
     /// \param datas
     /// \return
     ///水分解析结构
     QString waterAnalysisString(QStringList datas);

signals:
    void fondFiles(QStringList datas);
   void flushMsg(const QString& msg);
public:


public slots:

    void fileUpdated(const QString &path);   // 文件被修改时调用，path是监控的路径

private:

};

#endif // DATAMONITORINGANALYSIS_H
